package com.itheima.mapper;

import com.itheima.domain.Book;
import com.itheima.domain.BookSelective;

import java.util.List;

public interface BookMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Book record);

    int insertSelective(Book record);

    Book selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Book record);

    int updateByPrimaryKey(Book record);


    List<Book> selectNewBooks();
    List<Book> selectBooks();

    List<Book> selectBorrowedBooksByBorrower(String name);

    List<Book> selectBorrowedBooks();
    List<Book> selectBorrowedBooksSelective(BookSelective bookSelective);


    int selectBookNum();
    int selectAllBorrowedBookNum();
    int selectBorrowedBookNumByBorrower(String name);

    int selectBorrowedBookNumSelective(BookSelective bookSelective);

}